package com.example.prison.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.prison.entity.LeaveManagement;
import com.example.prison.entity.vo.PeopleDestination;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
* @author jiang
* @description 针对表【leave_management】的数据库操作Service
* @createDate 2023-04-06 15:18:51
*/
public interface LeaveManagementService extends IService<LeaveManagement> {

    PageInfo<LeaveManagement> getLeaves(int pageNumber, int pageSize,String destination, String status, String beginTime, String endTime);

    int addLeave(LeaveManagement leave);

    void deleteLeave(Integer[] ids);
    void deleteLeaveById(Integer id);

    Integer checkLeave(LeaveManagement leave);

    PageInfo<LeaveManagement> getLeavesByStatus(int pageNumber, int pageSize, String status);

    PageInfo<LeaveManagement> getLeavesByTime(int pageNumber, int pageSize, String beginDate, String endDate);

    LeaveManagement getLeavesById(Integer id);

    /** 打卡测试接口 */
    List<LeaveManagement> getLeavesByNameAndStatus(String name, String status);

    Integer updateLeave(LeaveManagement leave);

    Integer updateStatus(LeaveManagement leave);

    Integer earlyEndLeave(LeaveManagement leave);

    Integer endLeave(LeaveManagement leave);

    PageInfo<LeaveManagement> getNoReturn(int pageNumber, int pageSize);

    PageInfo<LeaveManagement> getLongTime(int pageNumber, int pageSize);

    PageInfo<LeaveManagement> getLeaveByDestination(int pageNumber, int pageSize, String destination);

    List<PeopleDestination> getLeaveDestinationAndPeople();

}
